

#ifndef GUI_TRANSITION_H__
#define GUI_TRANSITION_H__

#include <stdint.h>
#include <stdbool.h>

#include "gui.h"

enum TRANS_DIR
{
    TRANS_DIR_NONE = 0, 
    TRANS_DIR_TO_R = 0x01,
    TRANS_DIR_TO_L = 0x02,
    TRANS_DIR_TO_U = 0x04,
    TRANS_DIR_TO_D = 0x08,

    TRANS_DIR_HORIZONTAL = TRANS_DIR_TO_R | TRANS_DIR_TO_L,
    TRANS_DIR_VERTICAL = TRANS_DIR_TO_U | TRANS_DIR_TO_D,
};

typedef struct 
{
    // transition on X&Y
    int16_t x;
    int16_t y; 

    
    gui_view_t const *     ui_cur;
    gui_view_t const *     ui_sub;
    gui_view_t const *     ui_transition;
    uint8_t             trans_direction;
}gui_transition_t;


void gui_transition_set(
    const gui_view_t* ui_cur, const gui_view_t* ui_sub, const gui_view_t* ui_transition, int16_t x, int16_t y
);

gui_transition_t* gui_transition_get(void); 

void gui_transition_set_delta(int16_t x, int16_t y); 

#endif 
